wayland: Update the display serial on touch down/up events
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 20 Aug 2014 18:52:39 +0000 (20:52 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 26 Aug 2014 11:33:30 +0000 (13:33 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=734374

gdk/wayland/gdkdevice-wayland.c

index cc2be21e0e593540f97fbec70a9e4b123508f2b5..002b250f420636a662f5aeb7b313156ce023c29f 100644 (file)
@@ -1384,9 +1384,13 @@ touch_handle_down (void              *data,
                    wl_fixed_t         y)
 {
   GdkWaylandDeviceData *device = data;
+  GdkWaylandDisplay *wayland_display =
+    GDK_WAYLAND_DISPLAY (device->display);
   GdkWaylandTouchData *touch;
   GdkEvent *event;
 
+  _gdk_wayland_display_update_serial (wayland_display, serial);
+
   touch = gdk_wayland_device_add_touch (device, id, wl_surface);
   touch->x = wl_fixed_to_double (x);
   touch->y = wl_fixed_to_double (y);
@@ -1408,9 +1412,13 @@ touch_handle_up (void            *data,
                  int32_t          id)
 {
   GdkWaylandDeviceData *device = data;
+  GdkWaylandDisplay *wayland_display =
+    GDK_WAYLAND_DISPLAY (device->display);
   GdkWaylandTouchData *touch;
   GdkEvent *event;
 
+  _gdk_wayland_display_update_serial (wayland_display, serial);
+
   touch = gdk_wayland_device_get_touch (device, id);
   event = _create_touch_event (device, touch, GDK_TOUCH_END, time);